package cn.abcsys.cloud.devops.runtime.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.abcsys.cloud.devops.runtime.entity.Env;
import cn.abcsys.cloud.devops.runtime.model.EnvModel;
/**
 * @author mayunhao
 * @date   June 15,2017
 */
public interface EnvMapper {

	/**
	 * 创建
	 * @param Env
	 * @return
	 * @throws SQLException
	 */
	public int insertEnv(Env env) throws SQLException;

	/**
	 * 删除
	 * @param envId
	 * @return
	 * @throws SQLException
	 */
	public int deleteEnv(Integer envId) throws SQLException;

	/**
	 * 修改
	 * @param record
	 * @return
	 * @throws SQLException
	 */
	public int updateEnv(Env record) throws SQLException;

	/**
	 * 详情
	 * @param envId
	 * @return
	 * @throws SQLException
	 */
	public Env getEnvDetail(Integer envId) throws SQLException;

	/**
	 * 批量查询
	 * @param type
	 * @param tenantId
	 * @return
	 * @throws SQLException
	 */
	public List<Env> selectEnvList(Map map) throws SQLException;
	/**
	* @Title: selectEnvListByClusterId 
	* @Description: 通过clusterId查询相关环境 
	* @param @param envModel
	* @param @return    设定文件 
	* @return List<Env>    返回类型 
	* @throws
	 */
	public List<Env> selectEnvListByClusterId(@Param("clusterId")Integer clusterId) throws SQLException;

}
